#pragma once

#include "Core/Libs.h"
#include "Core/Math/Math.h"
#include "Core/Macros.h"
#include "tiny_obj_loader.h"

namespace SL
{

// struct Vertex
// {
//     float3 position;
//     float3 normal;
//     float2 texCoord;
//     float3 tangent;
// };

struct Vertex
{
    float3 position;
    float3 normal;
    float2 uv;
};

class SELAH_API OBJLoader
{
public:
    bool loadOBJ(const std::string& filename);
    std::vector<Vertex> getVertexBuffer() { return vertices; }
    std::vector<uint32_t> getIndexBuffer() { return indices; }

private:
    void fill_members(tinyobj::ObjReader&);
    std::vector<Vertex> vertices;
    std::vector<uint32_t> indices;
};

} // namespace SL